/*
 * @Author: wangzhichiao<https://github.com/wzc570738205>
 * @Date: 2020-03-12 20:16:22
 * @LastEditors: wangzhichiao<https://github.com/wzc570738205>
 * @LastEditTime: 2020-05-12 10:20:51
 */
import Vue from 'vue'
import 'font-awesome/css/font-awesome.css'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

import Vue2OrgTree from 'vue2-org-tree'

import editor from './plugin/editor'
import './plugin/editor/themes/default/default.css'
import './plugin/editor/kindeditor-all-min.js'
import './plugin/editor/lang/zh-CN.js'

Vue.use(editor)

Vue.use(Vue2OrgTree)

Vue.use(ElementUI)

Vue.config.productionTip = false

import VCharts from 'v-charts'

Vue.use(VCharts)
import BaiduMap from 'vue-baidu-map'
// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'

Vue.use(dataV)
import VueHighlightJS from 'vue-highlightjs'
import Router from 'vue-router'
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
// Tell Vue.js to use vue-highlightjs
Vue.use(VueHighlightJS)

Vue.use(BaiduMap, {
  ak: 'WwGCyjjMgl4irlvUrtqM48Z4P6wUFGlx'
})

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
